package com.xkdx.guangguang.fragment.user;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.xkdx.guangguang.module.network.AbsAction;

public class UserBindQQAction extends AbsAction {

	private String userID, loginToken, qQOpenID, qQNickName, qQToken, qQSex,
			qQExpireTime;

	public UserBindQQAction(String userID, String loginToken,
			String qQOpenID, String qQNickName, String qQSex, String qQToken,
			String qQExpireTime) {
		this.userID = userID;
		this.loginToken = loginToken;
		this.qQOpenID = qQOpenID;
		this.qQNickName = qQNickName;
		this.qQSex = qQSex;
		this.qQToken = qQToken;
		this.qQExpireTime = qQExpireTime;
	}

	@Override
	public void constructRequest() {

		HashMap<String, String> qqloginmap = new HashMap<String, String>();
		qqloginmap.put("DeviceID", "2");
		qqloginmap.put("UserID", userID);
		qqloginmap.put("LoginToken", loginToken);
		qqloginmap.put("QQOpenID", qQOpenID);
		qqloginmap.put("QQNickName", qQNickName);
		qqloginmap.put("QQSex", qQSex);
		qqloginmap.put("QQToken", qQToken);
		qqloginmap.put("QQExpireTime", qQExpireTime);

		String loginJson = constructJson(qqloginmap);

		Parameter parameter = new Parameter("userInterface", "bindQQ",
				loginJson);
		List<Parameter> list = new ArrayList<Parameter>();
		list.add(parameter);

		requestData = constructMod(list);
	}

}
